﻿<%@ Page Title="Library" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="library.aspx.cs" Inherits="AnimeLibrary.library" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div id="Search" class="float-right">
        <table>
            <tr>
                <td class="td_label">Search:</td>
                <td colspan="2"><asp:TextBox ID="txtSearch" runat="server" class="entry_fields" OnTextChanged="txtSearch_TextChanged" /></td>
            </tr>
            <tr>
                <td class="td_label">Sort By:</td>
                <td><asp:DropDownList ID="cmbSortBy" runat="server" class="entry_fields" OnSelectedIndexChanged="cmbSortBy_SelectedIndexChanged" AutoPostBack="True" EnableTheming="True">
                    <asp:ListItem Value="Author">Author</asp:ListItem>
                    <asp:ListItem Value="Title">Title</asp:ListItem>
                    <asp:ListItem Value="TotalEpisodes">No of Episodes</asp:ListItem>
                </asp:DropDownList></td>
                <td>
                    <asp:RadioButtonList ID="rdblstOrderBy" runat="server" CssClass="entry_fields" AutoPostBack="True" RepeatDirection="Horizontal" RepeatLayout="Flow" OnSelectedIndexChanged="rdblstOrderBy_SelectedIndexChanged">
                        <asp:ListItem Selected="True">ASC</asp:ListItem>
                        <asp:ListItem>DESC</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
        </table>
    </div>
    <br />
    <br />
    <br />
    <br />
    <br />
    <div id="Top_Navigation" class="navigation">
        <asp:HyperLink ID="lnkTopPrevious" runat="server" Font-Bold="True">< Previous</asp:HyperLink>
        <asp:Label ID="lblTopCurrentPage" runat="server" Font-Bold="True" />
        <asp:HyperLink ID="lnkTopNext" runat="server" Font-Bold="True">Next ></asp:HyperLink>
    </div>
    <br />
    <asp:Repeater ID="rptAnimeLibraryList" runat="server">
        <HeaderTemplate><div id="AnimeLibraryList"></HeaderTemplate>
        <ItemTemplate>
                <div id="AnimeLibraryList_Row">
                    <div id="AnimeLibraryList_Row_Header">
                        <a href='<%# string.Format("details.aspx?item={0}", Eval("ID")) %>'>
                            <img id="imgThumbnail" src='<%# Eval("ThumbnailLocation").ToString() %>' alt="Click for more details..." />
                        </a>
                    </div>
                    <div id="AnimeLibraryList_Row_Title">
                        <%# Eval("Title") %>
                    </div>
                    <div id="AnimeLibraryList_Row_Content">
                        Author: <%# Eval("Author") %>
                        <br />
                        No of Episodes: <%# Eval("TotalEpisodes") %>
                    </div>
                    <br />
                    <div id="AnimeLibraryList_Row_Footer">
                        <a href='<%# string.Format("details.aspx?item={0}", Eval("ID")) %>'>More Details...</a>
                    </div>
                </div>
        </ItemTemplate>
        <FooterTemplate></div></FooterTemplate>
    </asp:Repeater>
    <br />
    <div id="Bottom_Navigation" class="navigation">
        <asp:HyperLink ID="lnkBottomPrevious" runat="server" Font-Bold="True">< Previous</asp:HyperLink>
        <asp:Label ID="lblBottomCurrentPage" runat="server" Font-Bold="True" />
        <asp:HyperLink ID="lnkBottomNext" runat="server" Font-Bold="True">Next ></asp:HyperLink>
    </div>
</asp:Content>